/**
 * 
 */
package com.zhaoyan.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.zhaoyan.pojo.Company;
import com.zhaoyan.pojo.Plan;
import com.zhaoyan.pojo.PlanVo;

/**
 * @author zhaoyan
 *
 * 2020年1月29日
 */
public interface ComMapper {

	/**
	 * @param string
	 * @return
	 */
	@Select("SELECT * FROM zhunneng_department WHERE department = #{value}")
	Company findCom(String string);

	/**
	 * @param plan
	 * @return
	 */
	//Plan p = new Plan(id, proname, money, promanager, departid, details)
	@Insert("INSERT INTO zhunneng_2019_plan VALUES (0,#{proname},#{money},#{promanager},#{departid},#{details}) ")
	int addPlan(Plan plan);

	/**
	 * @param plan
	 * @return
	 */
	List<Plan> findPlan(PlanVo plan);

	/**
	 * @param id
	 * @return
	 */
	Plan findPlanById(Integer id);

	/**
	 * @return
	 */
	List<Company> findComany();

}
